package com.rpg.visao;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.border.Border;

public class GamePanel extends JPanel implements ActionListener {

	JPanel team1 = new JPanel();
	JPanel team2 = new JPanel();
	JPanel buttonsPanel = new JPanel();
	JPanel firstButtonsPanel = new JPanel();
	JPanel secondButtonsPanel = new JPanel();
	JPanel thirdBuddontsPanel = new JPanel();
	JPanel hpmpPanel = new JPanel();
	JPanel hpPanel = new JPanel();
	JPanel mpPanel = new JPanel();
	JPanel personagemPanel_01 = new JPanel();
	JPanel personagemPanel_02 = new JPanel();
	JPanel personagemPanel_03 = new JPanel();
	JPanel personagemPanel_04 = new JPanel();
	JPanel personagemPanel_05 = new JPanel();
	JPanel personagemPanel_06 = new JPanel();

	Border blackline = BorderFactory.createLineBorder(Color.black);

	public GamePanel() {
		initialize();
	}

	protected void initialize() {
		this.setVisible(true);
		setarLayout();
		addPanel();

	}

	@Override
	public void actionPerformed(ActionEvent e) {

	}

	private void setarLayout() {
		this.setLayout(new BorderLayout());
		this.add(team1, BorderLayout.WEST);
		this.add(team2, BorderLayout.EAST);
		this.add(buttonsPanel, BorderLayout.CENTER);
		

		team1.setLayout(new GridLayout(3, 1));
		team2.setLayout(new GridLayout(3, 1));
		buttonsPanel.setLayout(new GridLayout(3, 1));
		hpmpPanel.setLayout(new GridLayout(2, 1));
		hpPanel.setLayout(new FlowLayout());
		mpPanel.setLayout(new FlowLayout());
		
		
		
		// Personagens do primeiro time
		personagemPanel_01.setLayout(null);
		personagemPanel_02.setLayout(null);
		personagemPanel_03.setLayout(null);

		// Personagens do segundo time
		personagemPanel_04.setLayout(null);
		personagemPanel_05.setLayout(null);
		personagemPanel_06.setLayout(null);
	}

	private void addPanel() {
		buttonsPanel.add(firstButtonsPanel);
		buttonsPanel.add(secondButtonsPanel);
		buttonsPanel.add(thirdBuddontsPanel);
		
		team1.add(personagemPanel_01);
		team1.add(personagemPanel_02);
		team1.add(personagemPanel_03);

		team2.add(personagemPanel_04);
		team2.add(personagemPanel_05);
		team2.add(personagemPanel_06);
	}

}
